package com.hangzhou.welbeing.welbeinginstrument.utils;

import android.content.Context;
import android.content.pm.PackageManager;

/**
 * 杭州惟君医疗科技有限公司15
 * Created by 20433 on 2018/1/30
 */

public class PackageUtils {
    public static boolean checkPackage(Context paramContext, String packageName)
    {
        if ((packageName == null) || ("".equals(packageName))) {
            return false;
        }
        try {
            paramContext.getPackageManager().getApplicationInfo(packageName, PackageManager.GET_UNINSTALLED_PACKAGES);
            return true;
        } catch (PackageManager.NameNotFoundException e) {
            return false;
        }

    }
}
